<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
        <script>
            function f1(){
                // console.log(window.location)
                // console.log("获取当前窗口地址栏地址:"+location.href);

                //设置地址栏的地址，修改地址，会使得页面进行跳转
                location.href="success.html";
                // location.href="https://www.baidu.com";
            }
            function f2(){

                //获取打开当前窗口的窗口,利用48.window.html中的window.open打开53.location.html页面
                console.log(window.opener);
                console.log(window.opener.location.href)
            }

            function f3(){
                console.log("父窗口的地址栏:"+window.parent.location.href)
            }
        </script>
    </head>
    <body>
        <input type="button" value="location" onclick="f1()">
        <input type="button" value="获取打开该窗口的地址栏" onclick="f2()">
        <input type="button" value="获取父窗口" onclick="f3()">
    </body>
</html>